Package edu.uky.ai.ml.nn
Class Database
java.lang.Object
edu.uky.ai.ml.nn.Database
- All Implemented Interfaces:
java.lang.Iterable<Example>
- Direct Known Subclasses:
AlphabetDatabase
public class Database extends java.lang.Object implements java.lang.Iterable<Example>
A database is simply a collection of training examples on which a neural
network can be trained.
- Author:
- Stephen G. Ware
-
Constructor Summary
Constructors Constructor Description Database() -
Method Summary
Modifier and Type Method Description voidaddExample(double[] input, double[] output, java.lang.String label)Adds a new example to the database.java.util.Iterator<Example>iterator()intsize()Returns the number of examples in this database.
-
Constructor Details
-
Database
public Database()
-
-
Method Details
-
size
public int size()Returns the number of examples in this database.- Returns:
- the numbers of examples
-
addExample
public void addExample(double[] input, double[] output, java.lang.String label)Adds a new example to the database.- Parameters:
input- the values to assign to the input neuronsoutput- the expected values of the output neuronslabel- the class label associated with this example
-
iterator
- Specified by:
iteratorin interfacejava.lang.Iterable<Example>
-